/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/

void
Palindromo::init()
{
    this->palindromo = new palindrom();
}

void Palindromo::test()
{
    const char*
    word = this->editName->text().ascii();
    
    this->palindromo->setWord( word );
    
    if ( this->palindromo->isPalindrom() ) 
    {
	QMessageBox::information( this, "Palindromo", "É palindromo!" );
    }
    else
    {
	QMessageBox::information( this, "Palindromo", "Não é palindromo!" );
    }
}


void Palindromo::enableTest()
{
    if ( this->editName->text() != "")
	this->btnTest->setEnabled( true );
    else
	this->btnTest->setEnabled( false );
}
